3.1.14 \(\int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx\) [14]

3.1.14.1 Optimal result
3.1.14.2 Mathematica [A] (verified)
3.1.14.3 Rubi [A] (verified)
3.1.14.4 Maple [A] (verified)
3.1.14.5 Fricas [F]
3.1.14.6 Sympy [F]
3.1.14.7 Maxima [A] (verification not implemented)
3.1.14.8 Giac [F]
3.1.14.9 Mupad [B] (verification not implemented)

3.1.14.1 Optimal result

Integrand size = 23, antiderivative size = 129 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=2 i a c d^2 x+\frac {1}{2} b c d^2 x-\frac {1}{2} b d^2 \arctan (c x)+2 i b c d^2 x \arctan (c x)-\frac {1}{2} c^2 d^2 x^2 (a+b \arctan (c x))+a d^2 \log (x)-i b d^2 \log \left (1+c^2 x^2\right )+\frac {1}{2} i b d^2 \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d^2 \operatorname {PolyLog}(2,i c x) \]

output
2*I*a*c*d^2*x+1/2*b*c*d^2*x-1/2*b*d^2*arctan(c*x)+2*I*b*c*d^2*x*arctan(c*x 
)-1/2*c^2*d^2*x^2*(a+b*arctan(c*x))+a*d^2*ln(x)-I*b*d^2*ln(c^2*x^2+1)+1/2* 
I*b*d^2*polylog(2,-I*c*x)-1/2*I*b*d^2*polylog(2,I*c*x)
 
3.1.14.2 Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.80 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=-\frac {1}{2} d^2 \left (-4 i a c x-b c x+a c^2 x^2+b \arctan (c x)-4 i b c x \arctan (c x)+b c^2 x^2 \arctan (c x)-2 a \log (x)+2 i b \log \left (1+c^2 x^2\right )-i b \operatorname {PolyLog}(2,-i c x)+i b \operatorname {PolyLog}(2,i c x)\right ) \]

input
Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x,x]
 
output
-1/2*(d^2*((-4*I)*a*c*x - b*c*x + a*c^2*x^2 + b*ArcTan[c*x] - (4*I)*b*c*x* 
ArcTan[c*x] + b*c^2*x^2*ArcTan[c*x] - 2*a*Log[x] + (2*I)*b*Log[1 + c^2*x^2 
] - I*b*PolyLog[2, (-I)*c*x] + I*b*PolyLog[2, I*c*x]))
 
3.1.14.3 Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {5411, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx\)

\(\Big \downarrow \) 5411

\(\displaystyle \int \left (-c^2 d^2 x (a+b \arctan (c x))+2 i c d^2 (a+b \arctan (c x))+\frac {d^2 (a+b \arctan (c x))}{x}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {1}{2} c^2 d^2 x^2 (a+b \arctan (c x))+2 i a c d^2 x+a d^2 \log (x)-\frac {1}{2} b d^2 \arctan (c x)+2 i b c d^2 x \arctan (c x)-i b d^2 \log \left (c^2 x^2+1\right )+\frac {1}{2} i b d^2 \operatorname {PolyLog}(2,-i c x)-\frac {1}{2} i b d^2 \operatorname {PolyLog}(2,i c x)+\frac {1}{2} b c d^2 x\)

input
Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x,x]
 
output
(2*I)*a*c*d^2*x + (b*c*d^2*x)/2 - (b*d^2*ArcTan[c*x])/2 + (2*I)*b*c*d^2*x* 
ArcTan[c*x] - (c^2*d^2*x^2*(a + b*ArcTan[c*x]))/2 + a*d^2*Log[x] - I*b*d^2 
*Log[1 + c^2*x^2] + (I/2)*b*d^2*PolyLog[2, (-I)*c*x] - (I/2)*b*d^2*PolyLog 
[2, I*c*x]
 

3.1.14.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 5411
Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_ 
.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*ArcTan[c*x])^p, (f* 
x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p, 0] & 
& IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])
 
3.1.14.4 Maple [A] (verified)

Time = 0.81 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.04

method result size
parts \(a \,d^{2} \left (-\frac {c^{2} x^{2}}{2}+2 i c x +\ln \left (x \right )\right )+b \,d^{2} \left (-\frac {c^{2} x^{2} \arctan \left (c x \right )}{2}+2 i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {c x}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}\right )\) \(134\)
derivativedivides \(a \,d^{2} \left (-\frac {c^{2} x^{2}}{2}+2 i c x +\ln \left (c x \right )\right )+b \,d^{2} \left (-\frac {c^{2} x^{2} \arctan \left (c x \right )}{2}+2 i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {c x}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}\right )\) \(136\)
default \(a \,d^{2} \left (-\frac {c^{2} x^{2}}{2}+2 i c x +\ln \left (c x \right )\right )+b \,d^{2} \left (-\frac {c^{2} x^{2} \arctan \left (c x \right )}{2}+2 i \arctan \left (c x \right ) c x +\arctan \left (c x \right ) \ln \left (c x \right )+\frac {c x}{2}-i \ln \left (c^{2} x^{2}+1\right )-\frac {\arctan \left (c x \right )}{2}+\frac {i \ln \left (c x \right ) \ln \left (i c x +1\right )}{2}-\frac {i \ln \left (c x \right ) \ln \left (-i c x +1\right )}{2}+\frac {i \operatorname {dilog}\left (i c x +1\right )}{2}-\frac {i \operatorname {dilog}\left (-i c x +1\right )}{2}\right )\) \(136\)
risch \(\frac {i b \,d^{2} \operatorname {dilog}\left (i c x +1\right )}{2}-d^{2} b c x \ln \left (-i c x +1\right )-\frac {i d^{2} b \ln \left (-i c x +1\right ) c^{2} x^{2}}{4}-\frac {i d^{2} b \operatorname {dilog}\left (-i c x +1\right )}{2}+\frac {b c \,d^{2} x}{2}+\frac {i b \,d^{2} \ln \left (i c x +1\right ) c^{2} x^{2}}{4}+2 i b \,d^{2}-\frac {x^{2} d^{2} c^{2} a}{2}-\frac {5 i d^{2} b \ln \left (-i c x +1\right )}{4}+d^{2} a \ln \left (-i c x \right )-\frac {5 a \,d^{2}}{2}+2 i a c \,d^{2} x +b \,d^{2} \ln \left (i c x +1\right ) c x -\frac {3 i b \,d^{2} \ln \left (i c x +1\right )}{4}\) \(188\)

input
int((d+I*c*d*x)^2*(a+b*arctan(c*x))/x,x,method=_RETURNVERBOSE)
 
output
a*d^2*(-1/2*c^2*x^2+2*I*c*x+ln(x))+b*d^2*(-1/2*c^2*x^2*arctan(c*x)+2*I*arc 
tan(c*x)*c*x+arctan(c*x)*ln(c*x)+1/2*c*x-I*ln(c^2*x^2+1)-1/2*arctan(c*x)+1 
/2*I*ln(c*x)*ln(1+I*c*x)-1/2*I*ln(c*x)*ln(1-I*c*x)+1/2*I*dilog(1+I*c*x)-1/ 
2*I*dilog(1-I*c*x))
 
3.1.14.5 Fricas [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x,x, algorithm="fricas")
 
output
integral(-1/2*(2*a*c^2*d^2*x^2 - 4*I*a*c*d^2*x - 2*a*d^2 - (-I*b*c^2*d^2*x 
^2 - 2*b*c*d^2*x + I*b*d^2)*log(-(c*x + I)/(c*x - I)))/x, x)
 
3.1.14.6 Sympy [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=- d^{2} \left (\int \left (- \frac {a}{x}\right )\, dx + \int \left (- 2 i a c\right )\, dx + \int a c^{2} x\, dx + \int \left (- \frac {b \operatorname {atan}{\left (c x \right )}}{x}\right )\, dx + \int \left (- 2 i b c \operatorname {atan}{\left (c x \right )}\right )\, dx + \int b c^{2} x \operatorname {atan}{\left (c x \right )}\, dx\right ) \]

input
integrate((d+I*c*d*x)**2*(a+b*atan(c*x))/x,x)
 
output
-d**2*(Integral(-a/x, x) + Integral(-2*I*a*c, x) + Integral(a*c**2*x, x) + 
 Integral(-b*atan(c*x)/x, x) + Integral(-2*I*b*c*atan(c*x), x) + Integral( 
b*c**2*x*atan(c*x), x))
 
3.1.14.7 Maxima [A] (verification not implemented)

Time = 0.42 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.10 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=-\frac {1}{2} \, a c^{2} d^{2} x^{2} + 2 i \, a c d^{2} x + \frac {1}{2} \, b c d^{2} x - \frac {1}{4} \, \pi b d^{2} \log \left (c^{2} x^{2} + 1\right ) + b d^{2} \arctan \left (c x\right ) \log \left (c x\right ) + i \, {\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{2} - \frac {1}{2} i \, b d^{2} {\rm Li}_2\left (i \, c x + 1\right ) + \frac {1}{2} i \, b d^{2} {\rm Li}_2\left (-i \, c x + 1\right ) + a d^{2} \log \left (x\right ) - \frac {1}{2} \, {\left (b c^{2} d^{2} x^{2} + b d^{2}\right )} \arctan \left (c x\right ) \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x,x, algorithm="maxima")
 
output
-1/2*a*c^2*d^2*x^2 + 2*I*a*c*d^2*x + 1/2*b*c*d^2*x - 1/4*pi*b*d^2*log(c^2* 
x^2 + 1) + b*d^2*arctan(c*x)*log(c*x) + I*(2*c*x*arctan(c*x) - log(c^2*x^2 
 + 1))*b*d^2 - 1/2*I*b*d^2*dilog(I*c*x + 1) + 1/2*I*b*d^2*dilog(-I*c*x + 1 
) + a*d^2*log(x) - 1/2*(b*c^2*d^2*x^2 + b*d^2)*arctan(c*x)
 
3.1.14.8 Giac [F]

\[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=\int { \frac {{\left (i \, c d x + d\right )}^{2} {\left (b \arctan \left (c x\right ) + a\right )}}{x} \,d x } \]

input
integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x,x, algorithm="giac")
 
output
sage0*x
 
3.1.14.9 Mupad [B] (verification not implemented)

Time = 0.80 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.02 \[ \int \frac {(d+i c d x)^2 (a+b \arctan (c x))}{x} \, dx=\left \{\begin {array}{cl} a\,d^2\,\ln \left (x\right ) & \text {\ if\ \ }c=0\\ \frac {b\,c\,d^2\,x}{2}+\frac {a\,d^2\,\left (2\,\ln \left (x\right )-c^2\,x^2+c\,x\,4{}\mathrm {i}\right )}{2}-\frac {b\,d^2\,{\mathrm {Li}}_{\mathrm {2}}\left (1-c\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}+\frac {b\,d^2\,{\mathrm {Li}}_{\mathrm {2}}\left (1+c\,x\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{2}-b\,d^2\,\ln \left (c^2\,x^2+1\right )\,1{}\mathrm {i}-b\,c^2\,d^2\,\mathrm {atan}\left (c\,x\right )\,\left (\frac {1}{2\,c^2}+\frac {x^2}{2}\right )+b\,c\,d^2\,x\,\mathrm {atan}\left (c\,x\right )\,2{}\mathrm {i} & \text {\ if\ \ }c\neq 0 \end {array}\right . \]

input
int(((a + b*atan(c*x))*(d + c*d*x*1i)^2)/x,x)
 
output
piecewise(c == 0, a*d^2*log(x), c ~= 0, - b*d^2*log(c^2*x^2 + 1)*1i + (a*d 
^2*(2*log(x) + c*x*4i - c^2*x^2))/2 - (b*d^2*dilog(- c*x*1i + 1)*1i)/2 + ( 
b*d^2*dilog(c*x*1i + 1)*1i)/2 + (b*c*d^2*x)/2 - b*c^2*d^2*atan(c*x)*(1/(2* 
c^2) + x^2/2) + b*c*d^2*x*atan(c*x)*2i)